home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Examples / Robby / Starter.h < prev    next >
Encoding:
Text File  |  1995-11-27  |  2.2 KB  |  69 lines

  1. /*
  2.  
  3. Starter.h
  4. Robby
  5. Sean Luke
  6. August 14, 1995
  7. MiscKit Example
  8.  
  9. Permission to use, copy, modify, and distribute this material 
  10. for any purpose and without fee, under the restrictions as noted 
  11. in the MiscKit copyright notice, is hereby granted, provided that
  12. the MiscKit copyright notice and this permission notice 
  13. appear in all source copies, and that the author's name shall not
  14. be used in advertising or publicity pertaining to this 
  15. material without the specific, prior written permission 
  16. of the author.  SEAN O. LUKE  MAKES NO REPRESENTATIONS ABOUT THE
  17. ACCURACY OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE.  
  18. IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  19.  
  20. */
  21.  
  22. #import <appkit/appkit.h>
  23. @class MiscTapper;
  24. /* #import <misckit/MiscTapper.h> */
  25.  
  26. /*
  27. Starter is the main object of Robby.  It does four things, basically:
  28.  
  29. 0)  init sets up the MiscTapper
  30. 1)  appDidInit sets up the MiscVolumeLight (which is in an off-screen window)
  31. 2)  meterWillUpdateOnOwn is a delegate method of the MiscVolumeLight, which
  32.     is called _before_ the MiscVolumeLight locks focus and redraws itself.  
  33.     This gives Starter a chance to spit a blank app tile in the background for 
  34.     the Volume Light to draw on top of.  If you launch Robby from the
  35.     Workspace, this isn't necessary since the Workspace owns the app icon
  36.     and makes sure there's a nice background for it.  But if you launch Robby
  37.     from the Terminal (calling, say, Robby.app/Robby) then Robby owns the
  38.     app icon and you have to draw the little beveled, shaded-gray look
  39.     yourself.  cleanTileToWindow: does this for you.
  40. 3)  meterDidUpdate, another delegate method of MiscVolumeLight, tells Starter
  41.     that the meter has finished drawing itself in the window.  So Starter
  42.     then procedes to splat the resultant window image onto the app icon by
  43.     calling windowToAppIcon:.
  44.  
  45. Modifications
  46. January 1993:  Created original version of Robby
  47. August 14, 1995:  Ported Robby to as a MiscKit example
  48.  
  49. */
  50.  
  51. @interface Starter:Object
  52. {
  53.     id volume_light;
  54.     MiscTapper *tapper;
  55.     id hidden_window;
  56.     id  toggle_menu;
  57.     BOOL output;
  58.  
  59. }
  60.  
  61. - init;
  62. - appDidInit:sender;
  63. - meterDidUpdate:sender;
  64. - meterWillUpdateOnOwn:sender;
  65. - toggleInputOutput:sender;
  66. - free;
  67.  
  68. @end
  69.